package geppetto.phraseHMM.phraseExtraction.extractedphrase.data;

import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePair;
import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePairData;
import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePairDataCalc;
import geppetto.reordering.AbstractReorderingCalculator;
import geppetto.reordering.ReorderingInfo;

public class ReorderingDataCalc implements ExtractedPhrasePairDataCalc{

	AbstractReorderingCalculator reorderingCalc;
	
	public ReorderingDataCalc(AbstractReorderingCalculator reorderingCalc) {
		super();
		this.reorderingCalc = reorderingCalc;
	}

	public ExtractedPhrasePairData calcData(ExtractedPhrasePair epp) {
		ReorderingInfo reorderingInfo = reorderingCalc.getReorderingInfo(epp);		
		return new ReorderingData(reorderingInfo);
	}

	public ExtractedPhrasePairData loadFromString(String s) {
		return ReorderingData.parseString(s);
	}

}
